﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Util.Expand
{
  public static class ObjectExpand
    {
        public static bool IsNull(this object parameter)
        {
            try
            {
                if (parameter == null)
                {
                    return true;
                }
                if (parameter.ToString().Length == 0)
                {
                    return true;
                }
                if (parameter.ToString().Trim().Length == 0)
                {
                    return true;
                }
                if (parameter.ToString().Trim() == "")
                {
                    return true;
                }
            }
            catch (Exception)
            {
                return false;
            }
            
            return false;
        }
    }
}
